package calorie.com.calorie.contact;


import com.lxh.baselibray.mvp.BasePresent;
import com.lxh.baselibray.mvp.IBaseView;
import com.lxh.baselibray.net.NetCallBack;
import com.lxh.baselibray.net.ServiceGenerator;


import calorie.com.calorie.api.ApiService;
import calorie.com.calorie.response.ResultDTO;
import retrofit2.Call;
import retrofit2.Response;

public class GetAccelerateContact {
    public static class GetAcceleratePresent extends BasePresent<IGetAccelerateView> {
        public void getPrice() {
            ApiService service = ServiceGenerator.createService(ApiService.class);


            service.getAcceleratePrice().enqueue(new NetCallBack<ResultDTO>() {
                @Override
                public void onSuccess(Call<ResultDTO> call, Response<ResultDTO> response) {
                        if (getView()!=null){
                            getView().getPriceResult(response);
                        }
                }

                @Override
                public void onFailed() {

                }
            });
        }

    }

    public interface IGetAccelerateView extends IBaseView {
         public void getPriceResult(Response<ResultDTO> response);
    }

}
